package sctu.edu.java.year2016.team07.nieying.practice.dishizhang;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/6/1 0001.
 */
public class Ni {
    public static void main(String[] args){
        List<String> list=new ArrayList<>();
        list.add("nihao!");
        list.add("hi");
        list.add("konikiwa!");
        list.add("hola");
        list.add("Bonjour");
        System.out.println(list);                  //输出字符串
        System.out.println(list.contains("hi"));   //打印指定字符 打印成功输出true 打印失败输出false
        System.out.println(list.remove("hi"));    //删除指定字符，删除成功输出true 删除不成功输出false
        System.out.println(list.size());            //打印字符串的长度


    }
}
